<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>学生选课系统 - 课程评价</title>
  <script src="https://cdn.tailwindcss.com"></script>
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" rel="stylesheet">
  <link rel="stylesheet" href="../css/courseevaluate.css">
</head>
<body class="bg-gray-50 font-sans">
  <!-- 顶部导航栏 -->
  <header class="bg-white shadow-md fixed w-full z-50 transition-all duration-300" id="navbar">
    <div class="container mx-auto px-4 py-3 flex items-center justify-between">
      <div class="flex items-center space-x-2">
        <i class="fa-solid fa-graduation-cap text-blue-600 text-2xl"></i>
        <h1 class="text-xl font-bold text-gray-800">学生选课系统</h1>
      </div>
      
      <!-- <nav class="hidden md:flex items-center space-x-6">
        <a href="#" class="text-gray-600 font-medium hover:text-blue-800 transition-colors">首页</a>
        <a href="#" class="text-gray-600 font-medium hover:text-blue-800 transition-colors">选课</a>
        <a href="#" class="text-gray-600 font-medium hover:text-blue-800 transition-colors">课程表</a>
        <a href="#" class="text-blue-600 font-medium hover:text-blue-800 transition-colors">成绩查询</a>
      </nav> -->
      
      <div class="flex items-center space-x-4">
        <div class="relative">
          <button class="flex items-center space-x-2 focus:outline-none" id="userMenuBtn">
            <img src="../images/courseimages/user.jpg" alt="用户头像" class="w-8 h-8 rounded-full object-cover border-2 border-blue-500">
            <span class="hidden md:inline-block text-gray-700 font-medium">张三</span>
            <i class="fa-solid fa-angle-down text-gray-500"></i>
          </button>
          
          <!-- 用户下拉菜单 -->
          <div class="absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 hidden z-50" id="userMenu">
            <a href="../html/personalcenter.html" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">
              <i class="fa-solid fa-user mr-2"></i>个人中心
            </a>
            <a href="../html/accountsetting.html" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">
              <i class="fa-solid fa-cog mr-2"></i>账号设置
            </a>
            <div class="border-t border-gray-100 my-1"></div>
            <a href="../html/login.html" class="block px-4 py-2 text-sm text-red-600 hover:bg-gray-100">
              <i class="fa-solid fa-sign-out-alt mr-2"></i>退出登录
            </a>
          </div>
        </div>

        <button class="md:hidden focus:outline-none" id="mobileMenuBtn">
          <i class="fa-solid fa-bars text-gray-700 text-xl"></i>
        </button>
      </div>
    </div>
    
    <!-- 移动端菜单 -->
    <div class="md:hidden bg-white border-t border-gray-100 hidden" id="mobileMenu">
      <div class="px-2 pt-2 pb-3 space-y-1 sm:px-3">
        <a href="../html/home.html" class="block px-3 py-2 rounded-md text-base font-medium text-gray-600 hover:text-blue-600 hover:bg-blue-50">首页</a>
        <a href="../html/selectcoursecenter.htmlcourse.html" class="block px-3 py-2 rounded-md text-base font-medium text-gray-600 hover:text-blue-600 hover:bg-blue-50">选课</a>
        <a href="../html/coursetable.html" class="block px-3 py-2 rounded-md text-base font-medium text-gray-600 hover:text-blue-600 hover:bg-blue-50">课程表</a>
        <a href="../html/gradesselect.html" class="block px-3 py-2 rounded-md text-base font-medium text-blue-600 bg-blue-50">成绩查询</a>
      </div>
    </div>
  </header>

  <!-- 主内容区 -->
  <main class="container mx-auto pt-24 pb-12 px-4 md:px-6">
    <div class="grid grid-cols-1 lg:grid-cols-4 gap-6">
      <!-- 侧边栏 -->
      <aside class="lg:col-span-1">
        <div class="bg-white rounded-xl shadow-md overflow-hidden sticky top-24">
          <div class="bg-gradient-to-r from-blue-500 to-indigo-600 p-4">
            <div class="flex items-center space-x-4">
              <img src="../images/courseimages/user.jpg" alt="用户头像" class="w-16 h-16 rounded-full object-cover border-4 border-white shadow-lg">
              <div>
                <h2 class="text-white font-bold text-xl">张三</h2>
                <p class="text-blue-100 text-sm">计算机科学与技术学院</p>
                <p class="text-blue-100 text-sm">学号: 20230001</p>
              </div>
            </div>
          </div>
          
          <nav class="p-4">
            <ul class="space-y-1">
              <li>
                <a href="../html/personalcenter.html" class="flex items-center p-3 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors">
                  <i class="fa-solid fa-user-circle w-6"></i>
                  <span>个人信息</span>
                </a>
              </li>
              <li>
                <a href="../html/mycollect.html" class="flex items-center p-3 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors">
                  <i class="fa-solid fa-book w-6"></i>
                  <span>收藏课程</span>
                </a>
              </li>
              <li>
                <a href="../html/coursetable.html" class="flex items-center p-3 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors">
                  <i class="fa-solid fa-calendar-alt w-6"></i>
                  <span>课程表</span>
                </a>
              </li>
              <li>
                <a href="../html/courseevaluate.html" class="flex items-center p-3 text-blue-600 bg-blue-50 rounded-lg font-medium">
                  <i class="fa-solid fa-star w-6"></i>
                  <span>课程评价</span>
                </a>
              </li>
              <li>
                <a href="../html/gradesselect.html" class="flex items-center p-3 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors">
                  <i class="fa-solid fa-graduation-cap w-6"></i>
                  <span>成绩查询</span>
                </a>
              </li>
              <li>
                <a href="../html/accountsetting.html" class="flex items-center p-3 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors">
                  <i class="fa-solid fa-cog w-6"></i>
                  <span>账号设置</span>
                </a>
              </li>
            </ul>
          </nav>
        </div>
      </aside>
      
      <!-- 主内容 -->
      <div class="lg:col-span-3 space-y-6">
        <!-- 课程信息卡片 -->
        <div class="bg-white rounded-xl shadow-md p-6 transform hover:shadow-lg transition-shadow">
          <h2 class="text-2xl font-bold text-gray-800 mb-4">课程评价</h2>
          
          <div class="bg-blue-50 border-l-4 border-blue-500 p-4 mb-6">
            <div class="flex items-start">
              <div class="flex-shrink-0">
                <i class="fa-solid fa-info-circle text-blue-500 text-xl"></i>
              </div>
              <div class="ml-3">
                <h3 class="text-sm font-medium text-blue-800">评价说明</h3>
                <div class="mt-2 text-sm text-blue-700">
                  <p>请您根据实际情况对该课程进行评价，您的反馈将有助于提高教学质量。评价提交后将无法修改，请谨慎填写。</p>
                </div>
              </div>
            </div>
          </div>
          
          <div class="border-b border-gray-200 pb-4 mb-6">
            <h3 class="text-xl font-semibold text-gray-900">数据结构</h3>
            <div class="flex items-center text-gray-600 mt-1">
              <span class="mr-4"><i class="fa-solid fa-chalkboard-teacher mr-1"></i> 授课教师: 李四</span>
              <span><i class="fa-solid fa-clock mr-1"></i> 周一 3-4节</span>
            </div>
          </div>
          
          <!-- 评价表单 -->
          <form id="evaluationForm">
            <!-- 评分项 -->
            <div class="space-y-6 mb-8">
              <div>
                <label class="block text-sm font-medium text-gray-700 mb-2">教学态度</label>
                <div class="flex items-center" data-rating="5" data-name="teachingAttitude">
                  <div class="flex">
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer"></i>
                  </div>
                  <span class="ml-2 text-sm text-gray-500" id="teachingAttitudeRating">5分</span>
                </div>
              </div>
              
              <div>
                <label class="block text-sm font-medium text-gray-700 mb-2">教学方法</label>
                <div class="flex items-center" data-rating="4" data-name="teachingMethod">
                  <div class="flex">
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-gray-300 text-xl cursor-pointer"></i>
                  </div>
                  <span class="ml-2 text-sm text-gray-500" id="teachingMethodRating">4分</span>
                </div>
              </div>
              
              <div>
                <label class="block text-sm font-medium text-gray-700 mb-2">教学效果</label>
                <div class="flex items-center" data-rating="5" data-name="teachingEffect">
                  <div class="flex">
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer"></i>
                  </div>
                  <span class="ml-2 text-sm text-gray-500" id="teachingEffectRating">5分</span>
                </div>
              </div>
              
              <div>
                <label class="block text-sm font-medium text-gray-700 mb-2">作业难度</label>
                <div class="flex items-center" data-rating="3" data-name="homeworkDifficulty">
                  <div class="flex">
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-gray-300 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-gray-300 text-xl cursor-pointer"></i>
                  </div>
                  <span class="ml-2 text-sm text-gray-500" id="homeworkDifficultyRating">3分</span>
                </div>
              </div>
              
              <div>
                <label class="block text-sm font-medium text-gray-700 mb-2">总体评价</label>
                <div class="flex items-center" data-rating="4" data-name="overallRating">
                  <div class="flex">
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-yellow-400 text-xl cursor-pointer mr-1"></i>
                    <i class="fa-solid fa-star text-gray-300 text-xl cursor-pointer"></i>
                  </div>
                  <span class="ml-2 text-sm text-gray-500" id="overallRating">4分</span>
                </div>
              </div>
            </div>
            
            <!-- 文字评价 -->
            <div class="mb-8">
              <label for="comments" class="block text-sm font-medium text-gray-700 mb-2">文字评价</label>
              <textarea id="comments" rows="5" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent" placeholder="请详细描述您对该课程的感受和建议..."></textarea>
              <div class="flex justify-between items-center mt-2">
                <p class="text-xs text-gray-500">请至少输入20个字符</p>
                <span class="text-xs text-gray-500"><span id="charCount">0</span>/500</span>
              </div>
            </div>
            
            <!-- 优势与建议 -->
            <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
              <div>
                <label for="advantages" class="block text-sm font-medium text-gray-700 mb-2">课程优势</label>
                <textarea id="advantages" rows="3" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent" placeholder="请列举该课程的优势..."></textarea>
              </div>
              
              <div>
                <label for="suggestions" class="block text-sm font-medium text-gray-700 mb-2">改进建议</label>
                <textarea id="suggestions" rows="3" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent" placeholder="请提出您对该课程的改进建议..."></textarea>
              </div>
            </div>
            
            <!-- 提交按钮 -->
            <div class="flex justify-end space-x-3">
              <button type="button" class="px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 transition-colors">
                保存草稿
              </button>
              <button type="submit" class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors">
                提交评价
              </button>
            </div>
          </form>
        </div>
      </div>
    </div>
  </main>

  <!-- 页脚 -->
  <footer class="bg-gray-800 text-white py-12">
    <div class="container mx-auto px-4 md:px-6">
      <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
        <div>
          <h3 class="text-lg font-bold mb-4">学生选课系统</h3>
          <p class="text-gray-400 text-sm">为学生提供便捷的选课服务和个人信息管理</p>
        </div>
        
        <div>
          <h3 class="text-lg font-bold mb-4">快速链接</h3>
          <ul class="space-y-2 text-sm">
            <li><a href="../html/home.html" class="text-gray-400 hover:text-white transition-colors">首页</a></li>
            <li><a href="../html/selectcoursecenter.html" class="text-gray-400 hover:text-white transition-colors">选课中心</a></li>
            <li><a href="../html/coursetable.html" class="text-gray-400 hover:text-white transition-colors">课程表</a></li>
            <li><a href="../html/gradesselect.html" class="text-gray-400 hover:text-white transition-colors">成绩查询</a></li>
          </ul>
        </div>
        
        <div>
          <h3 class="text-lg font-bold mb-4">帮助支持</h3>
          <ul class="space-y-2 text-sm">
            <li><a href="#" class="text-gray-400 hover:text-white transition-colors">常见问题</a></li>
            <li><a href="#" class="text-gray-400 hover:text-white transition-colors">使用指南</a></li>
            <li><a href="#" class="text-gray-400 hover:text-white transition-colors">联系我们</a></li>
            <li><a href="#" class="text-gray-400 hover:text-white transition-colors">意见反馈</a></li>
          </ul>
        </div>
        
        <div>
          <h3 class="text-lg font-bold mb-4">联系我们</h3>
          <ul class="space-y-2 text-sm">
            <li class="flex items-center text-gray-400">
              <i class="fa-solid fa-envelope mr-2"></i>
              <span>support@example.com</span>
            </li>
            <li class="flex items-center text-gray-400">
              <i class="fa-solid fa-phone mr-2"></i>
              <span>010-12345678</span>
            </li>
            <li class="flex items-center text-gray-400">
              <i class="fa-solid fa-map-marker-alt mr-2"></i>
              <span>博雅甲512</span>
            </li>
          </ul>
        </div>
      </div>
      
      <div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400 text-sm">
        <p>© 2025 学生选课系统 版权所有</p>
      </div>
    </div>
  </footer>

  <!-- 提交成功模态框 -->
  <div class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden" id="successModal">
    <div class="bg-white rounded-xl shadow-xl max-w-md w-full p-6 transform transition-all">
      <div class="text-center">
        <div class="mx-auto flex items-center justify-center h-16 w-16 rounded-full bg-green-100 mb-4">
          <i class="fa-solid fa-check text-green-500 text-2xl"></i>
        </div>
        <h3 class="text-lg font-medium text-gray-900 mb-2">评价提交成功</h3>
        <p class="text-sm text-gray-500 mb-6">感谢您的反馈，您的评价已成功提交。</p>
        <div class="flex justify-center">
          <button class="px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors" id="closeSuccessModalBtn">
            返回
          </button>
        </div>
      </div>
    </div>
  </div>

  <script src="../js/courseevaluate.js"></script>
</body>
</html>
    